{{define "Title"}}按包装查询{{end}}
{{define "Content"}}

<script type=text/javascript src="/js/tablestyle.js"></script>

<div class="container-fluid">
<form class="form-horizontal" action="/querybox" method="POST">
  <fieldset>
    <legend><b>按包装查询</b></legend>
    <div class="control-group">
      <label class="control-label">包装箱号&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="boxid" name="boxid" style="background-color: #FFFFD0;" maxlength="30"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">查询</button>
    </div>
  </fieldset>
</form>
</div>

{{if .box_main.Boxid}}
<div class="content-box">
  <div class="content-box-header">
    <p style="font-size: 16px;">&nbsp;&nbsp;<b>包装箱</b></p>
  </div>
  <div class="content-box-content">
<table id="tbl_main" width="100%" border="1" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>包装箱号</th>
      <th>基准数量</th>
      <th>已装数量</th>
      <th>是否关闭</th>
      <th>是否发货</th>
      <th>订单</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.box_main.Boxid | html}}</td>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.box_main.BaseQty | html}}</td>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.box_main.PackedQty | html}}</td>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.box_main.Closed | html}}</td>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px">{{.box_main.Deliveryed | html}}</td>
      <td fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px"><a href="/querypo?q={{.box_main.Pono | html}}">{{.box_main.Pono | html}}</a></td>
    </tr>
  </tbody>
</table>  
</div>
</div>
{{end}}

{{if .box_ls}}
<div class="content-box">
  <div class="content-box-header">
    <p style="font-size: 16px;">&nbsp;&nbsp;<b>包装箱明细</b></p>
  </div>
  <div class="content-box-content">
<table id="tbl_ls" border="1" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>索引</th>
      <th>包装箱号</th>
      <th>产品序号</th>
      <th>包装时间</th>
    </tr>
  </thead>
  
  <tbody>
    {{range .box_ls}}
    <tr>
      <td id="detail_idx" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="80">{{.Index | html}}</td>
      <td id="detail_box" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="240">{{.Boxid | html}}</td>
      <td id="detail_ssn" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="240"><a href="/queryssn?q={{.Serial | html}}">{{.Serial | html}}</a></td>
      <td id="detail_dte" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="240">{{.Date | html}}</td>
    </tr>
    {{end}}
  </tbody>  
</table>
</div>
</div>
{{end}}

{{end}}